﻿using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Takkou
{
	public partial class OptionWindow : UserControl
	{
		private int numAperto;
		
		public OptionWindow()
		{
			// Required to initialize variables
			InitializeComponent();
			
			Loaded += new System.Windows.RoutedEventHandler(OptionWindow_Loaded);
			
			Video.Click += new System.Windows.RoutedEventHandler(Video_Click);
			
			OkButton.Click += new System.Windows.RoutedEventHandler(OkButton_Click);
			
			CancelButton.Click += new System.Windows.RoutedEventHandler(CancelButton_Click);
		}

		private void OptionWindow_Loaded(object sender, System.Windows.RoutedEventArgs e)
		{
			numAperto = 0;
			FSBut.Visibility = Visibility.Collapsed;
			ResolutionQ.Visibility = Visibility.Collapsed;
			ResolutionY.Visibility = Visibility.Collapsed;
		}

		private void Video_Click(object sender, System.Windows.RoutedEventArgs e)
		{
			if( numAperto%2 == 0)
			{
				FSBut.Visibility = Visibility.Visible;
				ResolutionQ.Visibility = Visibility.Visible;
				ResolutionY.Visibility = Visibility.Visible;
				numAperto++;
			}
			else
			{
				FSBut.Visibility = Visibility.Collapsed;
				ResolutionQ.Visibility = Visibility.Collapsed;
				ResolutionY.Visibility = Visibility.Collapsed;
				numAperto++;
			}
		}

		private void OkButton_Click(object sender, System.Windows.RoutedEventArgs e)
		{
			this.Visibility = Visibility.Collapsed;
		}

		private void CancelButton_Click(object sender, System.Windows.RoutedEventArgs e)
		{
			this.Visibility = Visibility.Collapsed;
		}
	
		
	}
}